from rest_framework.serializers import ModelSerializer
from rest_framework import serializers
from recruit.models import Enterprise


class HotEnterSerializer(ModelSerializer):
    """企业模型类序列化器 部分字段"""
    """另注：热门企业接口 也用了此序列化器"""

    recruits = serializers.PrimaryKeyRelatedField(read_only=True,many=True)
    class Meta:
        model = Enterprise
        fields = ['id','name','labels','logo','summary','recruits']